package cn.mall.auth.mapper;

import cn.mall.auth.domain.Role;
import cn.mall.base.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Jarvis-Smith
 * @since 2023-11-30
 */
public interface RoleMapper extends BaseMapper<Role> {

    List<String> loadPermissionSnsByRoleId(Long roleId);

    void deleteRolePermissionByRoleId(String roleId);

    void saveRolePermission(@Param("roleId") String roleId, @Param("permissionSns") List<String> permissionSns);

    void deleteRoleMenuByRoleId(Long roleId);

    void saveRoleMenu(@Param("roleId") Long roleId, @Param("menuId") List<Long> menuId);

    List<Long> loadMenuIdByRoleId(Long roleId);

    List<Long> loadRoleIds();
}
